#include "utils/list.h"

void deleteList(ListNode *head)
{
    auto ptr = head;
    while (ptr != nullptr)
    {
        auto tmp = ptr;
        ptr = ptr->next;
        delete tmp;
    }
}